<!DOCTYPE html>
<html lang="zh-CN"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorator="model/boardModel">

<body>

  <div th:fragment="pagenav" th:remove="tag">
    <div th:replace="model/nav :: pageheader ('用户管理','用户管理')"></div>
  </div>

  <div th:fragment="content" th:remove="tag">

    <div class="row">
      <div class="col-xs-12">
        <div class="box">
          <div class="box-header">
            <h3 class="box-title">用户管理</h3>
          </div>
          <!-- /.box-header -->
          <div class="box-body">
            <table id="userList" class="table table-bordered table-hover">

              <thead>
              <tr>
                <th>账户</th>
                <th>名称</th>
                <th>电话</th>
                <th>状态</th>
                <th>备注</th>
                <th>创建时间</th>
              </tr>
              </thead>

              <tbody>
              <tr th:each="obj : ${datas.list}">
                <td th:text="${obj.userName}"></td>
                <td th:text="${obj.nickName}"></td>
                <td th:text="${obj.phone}"></td>
                <td>
                  <div th:switch="${obj.status}" th:remove="tag">
                    <p th:case="1"><span class="green glyphicon glyphicon-ok-sign">正常</span></p>
                    <p th:case="*"><span class="red glyphicon glyphicon-remove-sign">停用</span></p>
                  </div>
                </td>
                <td th:text="${obj.memo}"></td>
                <td th:text="${obj.createTime}"></td>

             </tr>


              </tbody>

            </table>

            <div th:include="model/page :: pager" th:remove="tag"></div>

          </div>
          <!-- /.box-body -->
        </div>
        <!-- /.box -->
</div>
      </div>
</div>

  <!-- DataTables -->
  <script th:src="@{/plugins/datatables/jquery.dataTables.min.js}"></script>
  <script th:src="@{/plugins/datatables/dataTables.bootstrap.min.js}"></script>
  <!-- SlimScroll -->
<!--  <script th:src="@{/plugins/slimScroll/jquery.slimscroll.min.js}"></script>
  &lt;!&ndash; FastClick &ndash;&gt;
  <script th:src="@{/plugins/fastclick/fastclick.js}"></script>-->
  <!-- page script -->
<!--  <script>
    $(function () {
      $('#example2').DataTable({
        "paging": true,
        "lengthChange": false,
        "searching": false,
        "ordering": true,
        "info": true,
        "autoWidth": false
      });
    });
  </script>-->

</body>
</html>